from time import*
def read(filename):
    file = open(filename,'r')
    data = file.readlines()
    return data
def sort_m(mas):
    F=True
    while F:
        F=False
        for i in range(len(mas)-1):
            if mas[i]>mas[i+1]:
                mas[i],mas[i+1] = mas[i+1],mas[i]
                F = True
    return mas
m1 = read("m1_sorted.txt")
m2 = read("m2_severse.txt")
m3 = read("m3_shuffle.txt")

t_start = time()
m1=sort_m(m1)
t_finish = time()
print("Время", round((t_finish-t_start)*1000),"milliseconds")

t_start = time()
m2=sort_m(m1)
t_finish = time()
print("Время", round((t_finish-t_start)*1000),"milliseconds")

t_start = time()
m3=sort_m(m1)
t_finish = time()
print("Время", round((t_finish-t_start)*1000),"milliseconds")
